Skip to main content

libURLSetFTPStopTime

Type

command

Summary

Sets the timeout value for FTP transfers.

Syntax

libURLSetFTPStopTime <timeoutInSeconds>

Description

Use the libURLSetFTPStopTime command to increase the efficiency of multiple FTP transfers.

When LiveCode opens a socket to a host in order to upload or download a file via ftp, or to delete a file, it leaves the connection open for a time after the transaction completes. If another file is requested from the same FTP server during that time, LiveCode uses the same socket instead of opening another one. This saves time if you are transferring multiple files with the same server, since the socket does not need to be set up again for each file.

By default, the timeout value is 15 seconds.

note

If the server closes the connection, LiveCode does not attempt to keep it open. The timeout set by libURLSetFTPStopTime controls when LiveCode closes the connection from its end, but if the server closes the connection, a longer timeout has no effect.

Important

The libURLSetFTPStopTime command is part of the Internet library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "Internet" script library is selected.

Parameters

NameTypeDescription

timeoutInSeconds

A non-negative integer, or an expression that evaluates to a non-negative integer.

Examples

libURLSetFTPStopTime 30 -- 30-second timeout
libURLSetFTPStopTime field "Timeout Value"

command: delete URL, libURLftpUpload, libURLDownloadToFile, get, libURLSetFTPMode

glossary: timeout, application, main stack, handler, group, socket, standalone application, Standalone Application Settings, message, server, command, LiveCode custom library

keyword: ftp, file

library: Internet library, library

message: startup, openBackground, preOpenStack, openStack, preOpenCard

Compatibility and Support

Introduced

LiveCode 1.1.1

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?